<?php
/*
 *	Kleophatra - Open Source Content Management System
 *	------------------------------------------------------------------------
 *	Copyright (C) 2007-2010, Sergio Milardovich <smilardovich@yahoo.com.ar>
 *	This program is Free Software.
 *
 *	@package	Kleophatra
 *	@subpackage	/lib
 *	@license	http://www.gnu.org/copyleft/gpl.html GNU/GPL License 2.0
 *	@author		Sergio Milardovich <smilardovich@yahoo.com.ar>
 *	@link		http://www.kleophatra.org
*/
class kleolang extends kleocore {
  var $translate_mode = true;
  var $constans = array();
  function add($constant, $value=false,$cs=false){
    if(!is_array($constant)){
      if($this->translate_mode == true){
	$this->contants[$constant] = $value;
      }
      define($constant,$value,$cs);
    } else {
      foreach($constant as $const => $val){
	//Avoid suggestions
	if(is_array($val)){
		$val = $val[0];
	}
	// Do not duplicate constants
	if(!isset($this->constants[$const])){
	  $this->constants[$const] = $val;
	  define($const, $val, $cs);
	}
      }
    }
  }
}
?>
